Optimal. Leaf size=135 \[ \frac {i (a-i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {i (a+i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3624, 3563,
3620, 3618, 65, 214} \begin {gather*} \frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {i (a-i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {i (a+i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 3563
Rule 3618
Rule 3620
Rule 3624
Rubi steps
\begin {align*} \int \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2} \, dx &=\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}-\int (a+b \tan (c+d x))^{3/2} \, dx\\ &=-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}-\int \frac {a^2-b^2+2 a b \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}-\frac {1}{2} (a-i b)^2 \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx-\frac {1}{2} (a+i b)^2 \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}-\frac {\left (i (a-i b)^2\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}+\frac {\left (i (a+i b)^2\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}\\ &=-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}+\frac {(a-i b)^2 \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {(a+i b)^2 \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {i (a-i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {i (a+i b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 b \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{5/2}}{5 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.12, size = 158, normalized size = 1.17 \begin {gather*} \frac {\frac {2 (a+b \tan (c+d x))^{5/2}}{b}+5 (i a+b) \left (\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )-\sqrt {a+b \tan (c+d x)}\right )+5 i (a+i b) \left (-\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+\sqrt {a+b \tan (c+d x)}\right )}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(662\) vs.
\(2(111)=222\).
time = 0.13, size = 663, normalized size = 4.91
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {a^{2}+b^{2}}\, b^{2}-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}+\frac {-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (-b \tan \left (d x +c \right )-a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {a^{2}+b^{2}}\, b^{2}+\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {-2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}\right )}{b d}\) | \(663\) |
default | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {a^{2}+b^{2}}\, b^{2}-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}+\frac {-\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \ln \left (-b \tan \left (d x +c \right )-a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {a^{2}+b^{2}}\, b^{2}+\frac {\left (\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{2}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {-2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2}}\right )}{b d}\) | \(663\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 4304 vs.
\(2 (105) = 210\).
time = 1.62, size = 4304, normalized size = 31.88 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{\frac {3}{2}} \tan ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.32, size = 1141, normalized size = 8.45 \begin {gather*} \left (\frac {2\,a^2}{b\,d}-\frac {2\,\left (a^2+b^2\right )}{b\,d}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{5/2}}{5\,b\,d}+\mathrm {atan}\left (\frac {b^6\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}-\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}+\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}\,32{}\mathrm {i}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}+\frac {b^8\,16{}\mathrm {i}}{d}-\frac {a^2\,b^6\,32{}\mathrm {i}}{d}-\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}+\frac {32\,a\,b^5\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}-\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}+\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}+\frac {b^8\,16{}\mathrm {i}}{d}-\frac {a^2\,b^6\,32{}\mathrm {i}}{d}-\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}-\frac {a^2\,b^4\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}-\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}+\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}\,96{}\mathrm {i}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}+\frac {b^8\,16{}\mathrm {i}}{d}-\frac {a^2\,b^6\,32{}\mathrm {i}}{d}-\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}-\frac {96\,a^3\,b^3\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}-\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}+\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}+\frac {b^8\,16{}\mathrm {i}}{d}-\frac {a^2\,b^6\,32{}\mathrm {i}}{d}-\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {-a^3+a^2\,b\,3{}\mathrm {i}+3\,a\,b^2-b^3\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {b^6\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}+\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}-\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}\,32{}\mathrm {i}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}-\frac {b^8\,16{}\mathrm {i}}{d}+\frac {a^2\,b^6\,32{}\mathrm {i}}{d}+\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}-\frac {32\,a\,b^5\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}+\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}-\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}-\frac {b^8\,16{}\mathrm {i}}{d}+\frac {a^2\,b^6\,32{}\mathrm {i}}{d}+\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}-\frac {a^2\,b^4\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}+\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}-\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}\,96{}\mathrm {i}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}-\frac {b^8\,16{}\mathrm {i}}{d}+\frac {a^2\,b^6\,32{}\mathrm {i}}{d}+\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}+\frac {96\,a^3\,b^3\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {3\,a\,b^2}{4\,d^2}+\frac {b^3\,1{}\mathrm {i}}{4\,d^2}-\frac {a^3}{4\,d^2}-\frac {a^2\,b\,3{}\mathrm {i}}{4\,d^2}}}{\frac {32\,a^3\,b^5}{d}-\frac {16\,a\,b^7}{d}+\frac {48\,a^5\,b^3}{d}-\frac {b^8\,16{}\mathrm {i}}{d}+\frac {a^2\,b^6\,32{}\mathrm {i}}{d}+\frac {a^4\,b^4\,48{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________